{% extends 'admin/_layout.html' %}

{% block body %}
<div class="row">
    <div class="col-12 grid-margin stretch-card">
        <div class="card">
            <div class="row">
                <div class="col-md-4">
                    <div class="card-body">
                        <a href="/edit_user?back={{request.url}}" class="btn btn-outline-dark btn-fw">添加</a>
                    </div>
                </div>
                <div class="col-md-8">
                    <div class="card-body">
                        <form class="form-inline" style="float:right">
                            <label class=""></label>
                            <input type="text" class="form-control mb-2 mr-sm-2" id="" placeholder="关键字">
                            <button type="submit" class="btn btn-primary mb-2">搜索</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-lg-12 grid-margin stretch-card">
        <div class="card">
            <div class="card-body">
                <h4 class="card-title">用户管理</h4>
                <p class="card-description">
                    用户管理 /<code>用户列表</code>
                </p>
                <div class="table-responsive">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            {% for t in cfg %}
                            <th>{{t['label']}}</th>
                            {% endfor %}
                            <th>管理</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for row in data %}
                        <tr>
                            {% for item in cfg %}
                            <td>
                                {{row[item['field']]}}
                            </td>
                            {% endfor %}
                            <td>
                                <a href="/edit_user?id={{row['id']}}&back={{request.url}}" class="btn btn-inverse-success btn-fw">编辑</a>
                            </td>
                        </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}